<?php
   header("content-type:text/html;charset=utf8");
   $username = $_POST['username'];
   $userpwd = $_POST['userpwd'];
   $pdo = new PDO("mysql:host=127.0.0.1;dbname=week;charset=utf8","root","root");

   $sql = "SELECT * FROM login WHERE username = '$username' AND userpwd = '$userpwd'";

   $st = $pdo->query($sql);
   
   if($st){
   	  echo "登录成功";
   }else{
   	  echo "登录失败";
   }

?>